package com.lyf.scm.admin.domain.remote.allocationservice;

import com.lyf.scm.admin.domain.remote.allocationservice.dto.ActualSalesQtyQueryDTO;
import com.rome.arch.core.clientobject.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 大数据通用处理类（日补货接口）
 *
 * @author wangchlei
 * @date 2020/10/13
 */
@FeignClient(name = "scm-plan-service")
public interface BigDataGeneralHandlerRemote {
    @PostMapping("/api/v1/bigData/generalHandler/remedy")
    Response remedyBigDataJob();

    /**
     * 根据渠道、区域、sku聚合查询实际销量
     * @author wuyuanhang
     * @date 2020/11/11
     * @param dto   入参
     * @return Response<Map<String, List<BigDecimal>>>
     */
    @PostMapping("/api/v1/actualSalesQty/groupByChannelAreaSku")
    Response<Map<String, List<BigDecimal>>> groupByChannelAreaSku(@RequestBody ActualSalesQtyQueryDTO dto);

    /**
     * echart图查询实际销量，传dateList、startTime、endTime以及其他条件，如渠道、区域、品类、sku
     * @author wuyuanhang
     * @date 2020/11/11
     * @param dto   入参
     * @return  Response<List<BigDecimal>>
     */
    @PostMapping("/api/v1/actualSalesQty/groupByDate")
    Response<List<BigDecimal>> groupByDate(@RequestBody ActualSalesQtyQueryDTO dto);
}
